package com.ktkj.init.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ktkj.init.entity.RolePermissionMapping;
import com.ktkj.init.mapper.RolePermissionMappingMapper;
import com.ktkj.init.service.RolePermissionMappingService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 角色与权限映射表 服务实现类
 * </p>
 *
 * @author ktkj
 * @since 2021-12-31
 */
@Service
public class RolePermissionMappingServiceImpl extends ServiceImpl<RolePermissionMappingMapper, RolePermissionMapping> implements RolePermissionMappingService {

    @Override
    public List<RolePermissionMapping> getByRoleId(Long roleId) {
        QueryWrapper<RolePermissionMapping> wrapper = new QueryWrapper<>();
        wrapper.eq("role_id", roleId);
        return list(wrapper);
    }
}
